import Router from "koa-router";
import { loadRoutes } from "./utils/loadRouter";

// 实例化Router
const router: Router = new Router();


loadRoutes(router);

// 添加get路由
router.get("/", async (ctx) => {
  ctx.body = "hello word";
})


// 添加路由“/post”
router.get("/post", async (ctx) => {
  ctx.body = "post hello word";
})

// 添加路由“/get”
router.get("/get", async (ctx) => {
  ctx.body = "get hello word";
})



export default router;